package Demo05;

import java.util.Timer;
import java.util.TimerTask;

public class Main {
    public static void main1(String[] args) {
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println(111);
            }
        }, 2000);
    }
    public static void main(String args) {
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("9999");
            }
        }, 6000);
    }
}


